﻿using CommunityToolkit.Mvvm.ComponentModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wpf_Examples.Enums;

namespace Wpf_Examples.ViewModels
{
    public class ComboxViewModel:ObservableObject
    {
        /// <summary>
        /// 下拉通讯类型
        /// </summary>
        public IEnumerable<Sports> SportItems { get; set; }
        private Sports sportItemsSelectedItem = Sports.乒乓球;
        public Sports SportItemsSelectedItem
        {
            get { return sportItemsSelectedItem; }
            set { SetProperty(ref sportItemsSelectedItem, value); }
        }


        public ComboxViewModel()
        {
            SportItems = Enum.GetValues(typeof(Sports)).Cast<Sports>();
        }
    }
}
